<template>
  <div id="app">
    <login v-show="open" @close="doclose"></login>
    <!-- 主页面 -->
    <MyDesk v-show="show" />
    <!-- 其他界面展示区 -->
    <router-view v-show="!show"></router-view>
  </div>
</template>

<script>
import MyDesk from './components/MyDesk/MyDesk.vue';
import Login from './components/Login/Login.vue';

export default {
  name: 'App',
  components: {
    MyDesk,
    Login
  },
  data() {
    return {
      open: false
    }
  },
  computed: {
    show() {
      if (this.$route.path == '/') return true;
      return false;
    }
  },
  methods: {
    isopen(val) {
      this.open = val;
    },
    doclose(val) {
      this.open = val
    }
  },
  mounted() {
    this.$root.$on("open", this.isopen)
    console.log(this.$IsPhone,"*****是否是移动设备*****");
  },
}
</script>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  min-height: 100vh;
  overflow: hidden;
  background: -webkit-linear-gradient(to right bottom, #fbc7d4, #9796f0);
  background: linear-gradient(to right bottom, #fbc7d4, #9796f0);
  background-attachment: fixed;
}

/* 按钮btn 基础样式 */
body {
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #bdc3c7;
  text-align: center;
}

#app {
  /* position: relative;
  width: 100%;
  height: 100%; */
}
</style>
